package org.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.pojo.SysUser;
import org.example.service.UserFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
public class UserFeignController {

    @Resource
    private UserFeignService userFeignService;

    @RequestMapping("/consumer/user/get/{id}")
    public SysUser getUser(@PathVariable Integer id) {
        return userFeignService.getUser(id);
    }

}
